package cn.demoxy.controller;

import cn.demoxy.model.dto.DemoDataConfDTO;
import cn.demoxy.result.R;
import cn.demoxy.service.DemoServerConfService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.*;

/**
 * @auther demo
 * @date 2022/6/8 14:51
 * 服务器监控接口信息
 */
@Api(tags = " 服务器监控接口信息 ")
@AllArgsConstructor
@RestController
@RequestMapping("/admin/demo-server")
@CrossOrigin
public class DemoServerConfController {

    DemoServerConfService serverConfService;

    /**
     * 查询所有实时服务器监控信息
     *
     * @return
     * @params
     */
    @ApiOperation(value = "查询所有实时服务器监控信息")
    @GetMapping("/findAllServerConf")
    @RequiresPermissions("demo-server:list")
    public R findAllServerConf() {
        return R.ok(this.serverConfService.findAllServerConf());
    }
}
